//创建一个路由器，并暴露出去

//第一步 : 引入createRouter
import {
	createRouter,
	createWebHashHistory
} from 'vue-router'

//引入一个一个可以能要呈现的组件

import Index from '@/components/Index.vue'
import Login from '@/components/Login.vue'
import ResetPassword from '@/components/ResetPassword.vue'
import JournalContent from '@/components/JournalContent.vue'
import ExhibitorsDownload from '@/components/ExhibitorsDownload.vue'
import Agreement from '@/components/Agreement.vue'
import ExhibitorsCertificate from '@/components/ExhibitorsCertificate.vue'
import JournalContentSave from '@/components/JournalContentSave.vue'
import JournalContentDetail from '@/components/JournalContentDetail.vue'

//第二步 : 创建路由器
const router = createRouter({
	history: createWebHashHistory(), //路由器的工作模式
	routes: [ //一个个的路由规则
		{
			path: '/',
			component: Login,
			meta: {
				title: 'IC China 博览会 - 登录'
			}
		},
		{
			path: '/login',
			component: Login,
			meta: {
				title: 'IC China 博览会 - 登录'
			}
		},
		{
			path: '/index',
			component: Index,
			meta: {
				title: 'IC China 博览会 - 首页'
			}
		},
		{
			path: '/reset-password',
			component: ResetPassword,
			meta: {
				title: 'IC China 博览会 - 重置密码'
			}
		},
		{
			path: '/journal-content',
			component: JournalContent,
			meta: {
				title: 'IC China 博览会 - 会刊内容'
			}
		},
		{
			path: '/exhibitors-download',
			component: ExhibitorsDownload,
			meta: {
				title: 'IC China 博览会 - 下载专区'
			}
		},
		{
			path: '/agreement',
			component: Agreement,
			meta: {
				title: 'IC China 博览会 - 安全责任书'
			}
		},
		{
			path: '/exhibitors-certificate',
			component: ExhibitorsCertificate,
			meta: {
				title: 'IC China 博览会 - 证件申请'
			}
		},
		{
			path: '/journal-content-save',
			component: JournalContentSave,
			meta: {
				title: 'IC China 博览会 - 会刊内容'
			}
		},
		{
			path: '/journal-content-detail',
			component: JournalContentDetail,
			meta: {
				title: 'IC China 博览会 - 会刊内容'
			}
		}
	]
})

//暴露出去
export default router